package com.lantosec.hmrp.modules.warning.vo;

import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.warning.entity.WarningSummary;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class WarningSummaryVO extends BaseVO<WarningSummary> {
    private static final long serialVersionUID = 1L;


    public WarningSummaryVO(WarningSummary entity){
        this.ruleId = entity.getRuleId();
        this.ruleName = entity.getRuleName();
        this.warningTotal = entity.getWarningTotal();
        this.handleTotal = entity.getHandleTotal();
        this.notHandleTotal = entity.getNotHandleTotal();
        this.disposalRate = entity.getDisposalRate();
        this.dateCd = entity.getDateCd();
        this.startDate = entity.getStartDate();
        this.endDate = entity.getEndDate();
        this.pendingTotal = entity.getPendingTotal();
        this.disposalRejected = entity.getDisposalRejected();
        this.dataTime = entity.getDataTime();
        this.warningGrade = entity.getWarningGrade();
        this.total = entity.getTotal();
    }


    @ApiModelProperty(value = "预警规则")
    private String ruleId;

    @ApiModelProperty(value = "规则名称")
    private String ruleName;

    @ApiModelProperty(value = "预警数")
    private String warningTotal;

    @ApiModelProperty(value = "已处置")
    private Integer handleTotal;

    @ApiModelProperty(value = "未处置")
    private Integer notHandleTotal;

    @ApiModelProperty(value = "处置率")
    private String disposalRate;

    @ApiModelProperty(value = "预警账期")
    private String dateCd;

    @ApiModelProperty(value = "开始时间")
    private String startDate;

    @ApiModelProperty(value = "结束时间")
    private String endDate;

    @ApiModelProperty(value = "待审核")
    private Integer pendingTotal;

    @ApiModelProperty(value = "处置驳回")
    private Integer disposalRejected;

    @ApiModelProperty(value = "预警时间")
    private String dataTime;

    @ApiModelProperty(value = "预警等级 1一级 2二级 3三级")
    private Integer warningGrade;

    @ApiModelProperty(value = "预警总数")
    private Integer total;


    @Override
    public WarningSummary convertToEntity() {
        return new WarningSummary(this);
    }
}
